.class public Lcom/nbi/map/data/Maneuver;
.super Ljava/lang/Object;


# instance fields
.field private hA:I

.field private hB:Lnbisdk/hq;

.field private hC:Lnbisdk/ln;

.field private hD:Lnbisdk/ot;


# direct methods
.method public constructor <init>(ILjava/lang/Object;)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    check-cast p2, Lnbisdk/qq;

    invoke-virtual {p2}, Lnbisdk/qq;->kH()Lnbisdk/hq;

    move-result-object v0

    iput-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-virtual {p2}, Lnbisdk/qq;->kI()Lnbisdk/ln;

    move-result-object v0

    iput-object v0, p0, Lcom/nbi/map/data/Maneuver;->hC:Lnbisdk/ln;

    invoke-virtual {p2}, Lnbisdk/qq;->kJ()Lnbisdk/ot;

    move-result-object v0

    iput-object v0, p0, Lcom/nbi/map/data/Maneuver;->hD:Lnbisdk/ot;

    iput p1, p0, Lcom/nbi/map/data/Maneuver;->hA:I

    return-void
.end method


# virtual methods
.method public getCommand()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v0}, Lnbisdk/hq;->getCommand()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getDescription(Z)Ljava/lang/String;
    .locals 6

    invoke-virtual {p0, p1}, Lcom/nbi/map/data/Maneuver;->getManeuverText(Z)Lcom/nbi/map/data/FormattedTextBlock;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nbi/map/data/FormattedTextBlock;->getFormattedTextCount()I

    move-result v1

    new-instance v2, Ljava/lang/StringBuffer;

    invoke-direct {v2}, Ljava/lang/StringBuffer;-><init>()V

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v1, :cond_1

    invoke-virtual {v0, v3}, Lcom/nbi/map/data/FormattedTextBlock;->getFormattedText(I)Lcom/nbi/map/data/FormattedText;

    move-result-object v4

    invoke-virtual {v4}, Lcom/nbi/map/data/FormattedText;->getText()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0, v3}, Lcom/nbi/map/data/FormattedTextBlock;->getFormattedText(I)Lcom/nbi/map/data/FormattedText;

    move-result-object v5

    invoke-virtual {v5}, Lcom/nbi/map/data/FormattedText;->isNewLine()Z

    move-result v5

    if-eqz v5, :cond_0

    const-string v5, " "

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_0

    const-string v5, "\n"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    :cond_0
    invoke-virtual {v2, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_1
    invoke-virtual {v2}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getDistance()D
    .locals 2

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v0}, Lnbisdk/hq;->getDistance()D

    move-result-wide v0

    return-wide v0
.end method

.method public getManeuverID()I
    .locals 1

    iget v0, p0, Lcom/nbi/map/data/Maneuver;->hA:I

    return v0
.end method

.method public getManeuverText(Z)Lcom/nbi/map/data/FormattedTextBlock;
    .locals 4

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hC:Lnbisdk/ln;

    iget v1, p0, Lcom/nbi/map/data/Maneuver;->hA:I

    const/4 v2, 0x1

    iget-object v3, p0, Lcom/nbi/map/data/Maneuver;->hD:Lnbisdk/ot;

    invoke-interface {v0, v1, v2, v3, p1}, Lnbisdk/ln;->a(IZLnbisdk/ot;Z)Lnbisdk/nu;

    move-result-object v0

    new-instance v1, Lcom/nbi/map/data/FormattedTextBlock;

    invoke-direct {v1, v0}, Lcom/nbi/map/data/FormattedTextBlock;-><init>(Ljava/lang/Object;)V

    return-object v1
.end method

.method public getPoint()Lcom/nbi/map/data/Coordinates;
    .locals 5

    new-instance v0, Lcom/nbi/map/data/Coordinates;

    iget-object v1, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v1}, Lnbisdk/hq;->fY()Lnbisdk/at;

    move-result-object v1

    iget-wide v1, v1, Lnbisdk/at;->bC:D

    iget-object v3, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v3}, Lnbisdk/hq;->fY()Lnbisdk/at;

    move-result-object v3

    iget-wide v3, v3, Lnbisdk/at;->bD:D

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/nbi/map/data/Coordinates;-><init>(DD)V

    return-object v0
.end method

.method public getPrimaryStreet()Ljava/lang/String;
    .locals 3

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v0}, Lnbisdk/hq;->gi()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hC:Lnbisdk/ln;

    invoke-interface {v0}, Lnbisdk/ln;->N()Lnbisdk/ej;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/ej;->y()Lnbisdk/so;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/so;->getStreet()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_1

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0}, Lnbisdk/so;->getCity()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v0}, Lnbisdk/so;->getState()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v0}, Lnbisdk/hq;->gc()Lnbisdk/du;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/du;->getPrimary()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_1
    move-object v0, v1

    goto :goto_0
.end method

.method public getRoutingIcon()Ljava/lang/String;
    .locals 4

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hC:Lnbisdk/ln;

    iget v1, p0, Lcom/nbi/map/data/Maneuver;->hA:I

    const/4 v2, 0x1

    iget-object v3, p0, Lcom/nbi/map/data/Maneuver;->hD:Lnbisdk/ot;

    invoke-interface {v0, v1, v2, v3}, Lnbisdk/ln;->a(IILnbisdk/ot;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_1

    :cond_0
    const-string v0, "nc"

    :cond_1
    iget-object v1, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v1}, Lnbisdk/hq;->gi()Z

    move-result v1

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/nbi/map/data/Maneuver;->hC:Lnbisdk/ln;

    iget v2, p0, Lcom/nbi/map/data/Maneuver;->hA:I

    invoke-interface {v1, v2}, Lnbisdk/ln;->aM(I)Z

    move-result v1

    if-nez v1, :cond_2

    const-string v0, "nc"

    :cond_2
    return-object v0
.end method

.method public getSecondaryStreet()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v0}, Lnbisdk/hq;->gc()Lnbisdk/du;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/du;->getSecondary()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getTime()D
    .locals 2

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v0}, Lnbisdk/hq;->gd()D

    move-result-wide v0

    return-wide v0
.end method

.method public getTrafficDelay()D
    .locals 2

    iget-object v0, p0, Lcom/nbi/map/data/Maneuver;->hB:Lnbisdk/hq;

    invoke-interface {v0}, Lnbisdk/hq;->getTotalDelay()D

    move-result-wide v0

    return-wide v0
.end method
